﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Practices.Unity;

namespace Skynet.MeshClient
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        [Dependency]
        public Infrastructure.WpfClient.Services.Navigation.INavigationService NavigationService { get; set; }
        public MainWindow()
        {
            InitializeComponent();
        }
        private void BodySingleWorkspace_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if ((bool)e.NewValue == true)
            {
                this.frameWorkspace.Visibility = System.Windows.Visibility.Collapsed;
                this.TabWorkspace.Visibility = System.Windows.Visibility.Collapsed;
            }
        }
        private void frameWorkspace_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if ((bool)e.NewValue == true)
            {
                this.BodySingleWorkspace.Visibility = System.Windows.Visibility.Collapsed;
                this.TabWorkspace.Visibility = System.Windows.Visibility.Collapsed;
            }
        }

        private void TabWorkspace_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if ((bool)e.NewValue == true)
            {
                this.BodySingleWorkspace.Visibility = System.Windows.Visibility.Collapsed;
                this.frameWorkspace.Visibility = System.Windows.Visibility.Collapsed;
            }
        }

        private void ExamCategoriesMaintenance_Click(object sender, RoutedEventArgs e)
        {
            this.NavigationService.Navigate<Skynet.MeshAdministration.Views.MainExamCategory.IMainExamCategoryView>(Infrastructure.WpfClient.Constants.RegionNames.BodySingleWorkspace);            
        }
    }
}
